package com.nc.delivery_project.client.add_department;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.*;


public class AddDepartmentView extends Composite {
    interface AddDepartmentViewUiBinder extends UiBinder<VerticalPanel, AddDepartmentView> {
    }

    private static AddDepartmentViewUiBinder ourUiBinder = GWT.create(AddDepartmentViewUiBinder.class);
    
    AddDepartmentPresenter presenter;

    @UiField
    TextBox addressTxtBox;

    @UiField
    TextBox postalCodeTxtBox;

    @UiField
    ListBox cityLstBox;
    
    @UiField
    ListBox stateLstBox;
    
    @UiField
    ListBox countryLstBox;

    @UiField
    Button regBtn;
    
    public AddDepartmentView() {
        initWidget(ourUiBinder.createAndBindUi(this));
    }
    
    @UiHandler("regBtn")
    void registrationHandler(ClickEvent event) {
        presenter.registration();
    }

    public void setPresenter(AddDepartmentPresenter presenter) {
        this.presenter = presenter;
    }
}